#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File     : main.py.py
@Project  : dev
@Date     : 2021/12/5
@Author   : Zhang Jinyang
@Contact  : zhang-jy@sjtu.edu.cn
'''

from obj.GreedyScheduler import GreedyScheduler
import os
import logging

logger = logging.getLogger("executor")
INPUT_DIR = r"./input/"



if __name__ == "__main__":
    filepath = 'task1_case3.txt'
    scheduler = GreedyScheduler()
    scheduler.load_jobs(os.path.join(INPUT_DIR, filepath))
    scheduler.schedule_jobs(visual=True)
    logger.info(scheduler.outputSolutionFromBlock())
    logger.info(scheduler.outputSolutionFromCore())
    scheduler.visualize()